#include "web_server.h"
#include "st_sock_holder.h"
#include "web_sock_holder.h"

namespace vmon_web
{
    WebServer::WebServer(unsigned short port):
        STServer(port)
    {
        // nothing to do rightnow
    }

    WebServer::~WebServer()
    {
        // nothing to do rightnow
    }

    // FIXME: this is not clean...
    STSockHolder* WebServer::newSockHolder(int sock)
    {
        WebSockHolder* holder = new WebSockHolder(sock, m_servletContainer);
        return holder;
    }

    bool WebServer::handleMsg()
    {
        // call super
        return STServer::handleMsg();
    }

    HttpServletContainer& WebServer::getServletContainer()
    {
        return m_servletContainer;
    }
}
